When digital messages are transmitted over telecommunication networks some errors can be expected and to insure data integrity, the serialized data is protected with Error Detection Codes. In high speed networks the lines have a low error rate and the security of data only requires a end to end process. The data integrity process is carried out at both the sending and the receiving station; the sending station calculates a code corresponding to the data and the transmitting station checks the integrity of the data and code. ATM uses a Frame Check Sequence (FCS) field derived from Cyclic Redundancy Check (CRC) Error Detection codes for error checking. The CRC codes are often used for checking integrity of data because they are easy to implement and they detect a large class of errors. The access nodes of an ATM network have the responsibility of data integrity. The originating node calculates the redundancy bits constituting the Frame Check Sequence, (FCS) which is appended by the originating system to the bit stream to be checked before sending it over the network. At the destination node, the bit stream plus its initial FCS are checked using similar CRC computation. There is no error in transmission if the computed FCS at the destination node yields a constant value depending on the type of CRC used. It is noted that in an ATM network the FCS calculation and checking are performed in the ATM adapter cards of ATM access nodes (et the entry of the network), in ATM-connected user end stations, and also in ATM nodes providing internetworking functions such as ATM-Frame Relay.
CRC codes are generated by a generator polynomial characterizing the type of CRC; the CRC code corresponding to the polynomial representation of a bit stream to be encoded is the remainder of the polynomial division of the polynomial representation of the bit stream by the polynomial generator. CRC calculations are described, for instance, in `Teleinformatique I` of Henri Nussbaumer, 1987, Presses informatiques romandes CH-1015 Lausanne. The FCS code has been standardized for data integrity checking as described in the ANSI X3.139-1987 document pages 28 and 29 and in Appendix B thereto. All the CRC codes constitute a finite Galois Field. If the polynomial generator is of degree d, the Galois Field of the CRC codes has 2.sup.d -1 elements. The simple implementation of codes based on CRC is due to the simple characteristics of calculations in the finite Galois Fields.
In ATM networks different types of connections may be established depending on the quality of service required. Some ATM standards organizations (ITU-T The International Telecommunication Union--Telecommunication and ETSI The European Telecommunication Standardization Institute ) have standardized different ATM Adaptation Layers (AALs) to provide generalized interworking across the ATM network. In the case of data, this AAL function takes frames (blocks) of data delivered to the ATM network, breaks them up into cells and adds necessary header information to allow rebuilding of the original block at the receiver. The AAL function includes checking for errors. The AAL function is implemented in the ATM end point which connects to the ATM network over the User Network Interface (UNI). As ATM switches usually contain endpoint functions as well as switch functions, AAL function is also implemented in ATM switches. Different AALs correspond to different traffic types. For instance, AAL1 is used for the service class A, circuit emulation, while AAL3/4 provides an end-to-end transport for both connection oriented (class C) and connectionless data (class D). AAL5 is designed to operate significantly more efficiently than AAL3/4 and has become the 1.364 ITU-T standard. The implementation of the AAL5 function is characterized by its low cost, compared to the other AAL implementations, in terms of overhead in the network nodes.
The ATM cell headers have their own error checking based on FCS calculation. The payload of 384 bits (48 bytes) of some ATM cells also uses FCS redundancy bits for error checking. The last 32 bits of cell payload of the last cell of a message conveyed through an AAL5 type connection represents the FCS code calculated on the message. The FCS code used for AAL5 cells is based on the CRC-32 codes calculations. We can represent bit streams as polynomials having coefficients values of 0 or 1, each power of X representing the weight of the bit in the stream. The addition of such polynomials correspond to logical addition (XORs) on their coefficients. The CRC-32 codes belong to the Galois Field generated by the following generator polynomial of degree 32: EQU G(X)=X.sup.32 +X.sup.26 +X.sup.23 +X.sup.22 +X.sup.16 +X.sup.12 +X.sup.11 +X.sup.10 +X.sup.8 +X.sup.7 +X.sup.5 +X.sup.4 +X.sup.2 +X+1
This generator polynomial of degree 32 was chosen as a standard for error checking in Ethernet and then chosen by the ATM standard for AAL5 error checking. The standard used for FCS calculation based on the polynomial generator of degree 32 is described in the publication `American National Standard for information systems, fiber distributed data interface (FDDI)--token ring media access control (MAC)` ANSI X3.139-1987 of American National Standards Institute, inc.
If P(X) is the polynomial representation of a bit stream for which the 32 bit stream FCS is to be calculated: EQU FCS(P(X))=L(X)+Rem.sub.G (X.sup.32 P(X)+X.sup.k L(X)) (Expression 1)
with
k-1=degree of P(X) PA0 L(X)=X.sup.31 +X.sup.30 + . . . +X.sup.2 +X+1. PA0 C(X)=X.sup.31 +X.sup.30 +X.sup.26 +X.sup.25 +X.sup.24 +X.sup.18 +X.sup.15 +X.sup.14 +X.sup.12 +X.sup.11 +X.sup.10 +X.sup.8 +X.sup.6 +X.sup.5 +X.sup.4 +X.sup.3 +X+1; PA0 k'-1=degree of F(X); and PA0 L(X)=X.sup.31 +X.sup.30 + . . . +X.sup.2 +X+1 PA0 .times. is the sign of the polynomial multiplication in the Galois Field (a two step operation comprising a first step to multiply the two polynomials and a second step to take the remainder of the result in the division by G); PA0 .alpha. is an irreducible polynomial, root of the Galois Field generated by G; and PA0 .alpha..sup.8 is the 9th element of the Galois Field (simple element having only one coefficient equal to 1 in its polynomial representation).
Similarly, for FCS checking at the other side of a network when receiving a bit stream F'(X) including the appended FCS which has been calculated before sending, the checking is positive only if: EQU Rem.sub.G (X.sup.32 (F'(X)+X.sup.k' L(X)))=C(X) (Expression 2)
with
The FCS bottleneck in FCS computation and checking is the Rem.sub.G operation. The result is a CRC code belonging to the set of residue classes modulo G(X) of the polynomials of coefficients equal to 1 or 0 which is a ring, a linear algebra and which is a Galois Field having a multiplicative cyclic group because G(X), the generator polynomial of degree 32, is an irreducible polynomial.
The standard circuitry for computing the FCS of a bit stream message is a Linear Feedback Shift Register (LFSR) which carries out a bit by bit multiplication in the corresponding Galois Field. Each bit of the message is pushed in the LFSR, Most Significant Bit (MSB) first. The division is performed by the feedbacks. At the end of the process, the FCS (remainder of the division) is within the shift register. This method and type of circuitry is described, for instance in `Error Checking Codes` by Peterson and Weldon, the MIT Press, 2nd edition, 1972. Although simple the method has obvious drawbacks. For example, since only one bit is processed at each shift, as many shifts as the number of bits is the message are needed in the LFSR. As the 32 bit CRC is used, a 32 bit register is needed. In this LFSR the remainder is calculated on a message shifted left by 32 bit places according to Expression 1 and Expression 2 for FCS calculation and checking. Still in order to be in accordance with Expression 1 and Expression 2, the polynomial addition of X.sup.k L(X) is realized by presetting the Shift register to all ones. Computing the CRC takes as many clock pulses as there are bits in the message.
A faster FCS calculation is provided in the patent application published under the reference EP 0614 294 entitled `Method for generating a frame check sequence` disclosing a one (or more) byte (s) based FCS calculation, this method being more efficient than a bit based FCS calculation as with the LFSRs. This technique takes advantage of the properties of the operations in the Galois Fields. One property of the Galois Field is to have a root .alpha., an irreducible polynomial element of the Galois Field, characterized in that each element of the Galois Field is represented by .alpha..sup.d, d being one integer greater or equal to zero and smaller than the number of elements of the Galois Field. According to a preferred embodiment described in the patent application, the calculation of FCS of a byte stream can be performed byte by byte, each new byte read being XORed with the result of the multiplication of the previous FCS value by the .alpha..sup.8 element of the Galois Field. The multiplier is the implementation of the .alpha..sup.8 multiplication in the Galois Field, this means modulo the polynomial generator G(X). The mathematical formula illustrating the method is expressed in the Galois Field as follows: EQU FCS(N+1)=FCS(N).times..alpha..sup.8 +B(N+1) (Expression 3)
where FCS(N) is the FCS of the message consisting of the N previous bytes; B(N+1) is the polynomial representation of the next byte (new byte) of the message;
This per byte calculation of the FCS according to Expression 3 is implemented using a Multiplier adder. ATM access nodes have this Multiplier adder implemented in their adapter cards. The Multiplier adder of the prior art when applied to the computation of CRC-32 based FCS requires the combinational operations described in the following table 1 to be implemented. The 32 bits of the FCS, as shown in the first column, calculated at the reception of a new byte N, result in the combination of the bits of the FCS calculated on the preceeding bytes (up to N-1), as shown in the second column, with the bits of the incoming new byte (B(i)). In the third column is indicated the number of XOR entries necessary to the combination of the corresponding bit. It varies from 2-way to 8-way XORs. As with the LSFR solution the register receiving the 32 bit stream CRC is preset to all ones.
TABLE 1 FCS(0) B(0), FCS(24, 30) 3 FCS(1) B(1), FCS(24, 25, 30, 31) 5 FCS(2) B(2), FCS(24, 25, 26, 30, 31) 6 FCS(3) B(3), FCS(25, 26, 27, 31) 5 FCS(4) B(4), FCS(24, 26, 27, 28, 30) 6 FCS(5) B(5), FCS(24, 25, 27, 28, 29, 30, 31) 8 FCS(6) B(6), FCS(25, 26, 28, 29, 30, 31) 7 FCS(7) B(7), FCS(24, 26, 27, 29, 31) 6 FCS(8) FCS(0, 24, 25, 27, 28) 5 FCS(9) FCS(1, 25, 26, 28, 29) 5 FCS(10) FCS(2, 24, 26, 27, 29) 5 FCS(11) FCS(3, 24, 25, 27, 28) 5 FCS(12) FCS(4, 24, 25, 26, 28, 29, 30) 7 FCS(13) FCS(5, 25, 26, 27, 29, 30, 31) 7 FCS(14) FCS(6, 26, 27, 28, 30, 31) 6 FCS(15) FCS(7, 27, 28, 29, 31) 5 FCS(16) FCS(8, 24, 28, 29) 4 FCS(17) FCS(9, 25, 29, 30) 4 FCS(18) FCS(10, 26, 30, 31) 4 FCS(19) FCS(11, 27, 31) 3 FCS(20) FCS(12, 28) 2 FCS(21) FCS(13, 29) 2 FCS(22) FCS(14, 24) 2 FCS(23) FCS(15, 24, 25, 30) 4 FCS(0) B(0), FCS(24, 30) 3 FCS(1) B(1), FCS(24, 25, 30, 31) 5 FCS(2) B(2), FCS(24, 25, 26, 30, 31) 6 FCS(24) FCS(16, 25, 26, 31) 4 FCS(25) FCS(17, 26, 27) 3 FCS(26) FCS(18, 24, 27, 28, 30) 5 FCS(27) FCS(19, 25, 28, 29, 31) 5 FCS(28) FCS(20, 26, 29, 30) 4 FCS(29) FCS(21, 27, 30, 31) 4 FCS(30) FCS(22, 28, 31) 3 FCS(31) FCS(23, 29) 2
The CRC-32 calculation is based on a polynomial of degree 32 which has many more terms (15) than any other CRC polynomial defined by the standards organizations of the Telecommunications industry. The amount of calculations needed to handle a new incoming byte of data in a per byte computation is large if the number of terms of the polynomial is large, because a large number of bits of the current intermediate result must be combined to get each bit of the next byte. As shown on the table above, a 8-way XOR will be used for CRC-32 which is quite a complex operation. As a matter of fact, the processing complexity of the N-way increases with N. This complexity tends to go against the intrinsic speed advantage of the per byte computation by requiring that more processing be done at each cycle. That is why with current technologies (for instance standard sub-micron CMOS technology), it is very difficult to perform the FCS calculations for data integrity checking of payload while sustaining media speed. Particularly over OC12 (622 Mbps) optical links a cell (48 bytes) should be processed in 700 ns. In the ATM adaptation layer, the FCS calculation/checking of AAL5 cells FCS should not be delayed: particularly AAL5 cells are used for network management messages which must be recognized immediately in order to enable corrective actions. If not, a significant amount of data could be mishandled, generally discarded, because some resources (buffers, bandwidth) were not allocated on time.
It is the object of the invention to reduce process time of the payload FCS calculation based on CRC-32 codes of packets sent over the network and the process of checking the cell payload FCS in the packets received on the other side of the network.